/*
 *
math: 6
6

 */

#include <iostream>
#include <algorithm>
#include <list>
#include <vector>
using namespace std;
int main(void){

	int a1[] ={10,20,30,40,50,60,70,80,90};
	int a2[]= {70,80,90};
	int *ptr = search(a1, a1+9, a2, a2+3);
	if(ptr == a1+9)
		cout << "not match" << endl;
	else
		cout << "math: " << ptr - a1 << endl;
	
	list<int> L;
	vector<int> V;
	for(int i=0; i<9; i++){
		L.push_back(a1[i]);
	}
	for(int i=0; i<3; i++){
		V.push_back(a2[i]);
	}
	list<int>::iterator pos;
	pos = search(L.begin(), L.end(), V.begin(), V.end());
	cout << distance(L.begin(), pos) << endl;
	return 0;
}
